<!DOCTYPE html>

<head>
    <meta charset="UTF-8">

    <title>Document</title>
    <script src="../sourceData/jquery-2.1.4/jquery.min.js"></script>
</head>

<body>

    <button id="b1">点击</button>
    <button id="b2">点击展示</button>
    <h3 id="h3">展示数据</h3>
    <script>
        var x = true;
        $('#b2').click(function () {
            if (x) {
                $("#h3").hide();
            } else {
                $("#h3").show();
            }
            x = !x

        })


        $('#b1').click(function () {
            alert("asdfsdaf")
        })

    </script>
</body>

</html>